package com.git.smp.controller;

import java.io.ByteArrayOutputStream;
import java.io.DataOutputStream;

import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletResponse;
import javax.websocket.DecodeException;

import org.apache.commons.codec.binary.Base64;
import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import org.dom4j.io.OutputFormat;
import org.dom4j.io.XMLWriter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.json.JacksonJsonParser;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;


import com.fasterxml.jackson.core.util.DefaultPrettyPrinter;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.git.smp.cache.DataDictionaryCache;

import com.git.smp.core.PageRequest;
import com.git.smp.core.ResponseMessage;
import com.git.smp.dao.EsbEnvironmentMapper;
import com.git.smp.dao.LogDetailMapper;
import com.git.smp.dao.SmpEnvironmentMapper;
import com.git.smp.dao.SrvServiceLogDataMapper;
import com.git.smp.entity.ApplyEnvironment;
import com.git.smp.entity.DataDictionary;
import com.git.smp.entity.EsbEnvironment;
import com.git.smp.entity.LogDetail;
import com.git.smp.entity.LogDetailKey;
import com.git.smp.entity.NetWork;
import com.git.smp.entity.SmpEnvironment;
import com.git.smp.entity.SrvServiceLogDataExtend;
import com.git.smp.entity.SrvServiceLogDataWithBLOBs;
import com.git.smp.utils.EBCDICTransUtil;
import com.git.smp.utils.ExecuteShellUtil;
import com.git.smp.utils.HexBin;
import com.git.smp.utils.ObjectUtil;
import com.git.smp.utils.StringCompress;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.jcraft.jsch.JSchException;

@RestController
@RequestMapping("/esbEnvironment")
public class EsbEnvironmentController {
	
	Logger logger = LoggerFactory.getLogger(EsbEnvironmentController.class);
	
	
	
	@Autowired
	EsbEnvironmentMapper esbEnvironmentMapper;
	
	
	@RequestMapping("/getEsbEnvironmentByEsbFlg")
	public ResponseMessage<List<EsbEnvironment>> getEsbEnvironmentByEsbFlg(@RequestBody EsbEnvironment esbEnvironment){
		ResponseMessage<List<EsbEnvironment>> responseMessage = new ResponseMessage<List<EsbEnvironment>>();
		responseMessage.setCode("0000");
		responseMessage.setMessage("查询成功！");

		List<EsbEnvironment> listEsbEnvironment = esbEnvironmentMapper.select(esbEnvironment);
		if (listEsbEnvironment == null) {
			responseMessage.setCode("0001");
			
			responseMessage.setMessage("查询菜单信息失败！");
		}
		responseMessage.setExtend(listEsbEnvironment);
		logger.info(responseMessage.getMessage());
		return responseMessage;
	}
	

	  
}
